package cn.xuchunh.campusbbs.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by XuChunH on 2015/10/22.
 */
public class Album implements Parcelable{

    private int id;
    private int userId;
    private long releaseDate;
    private long lastUpdateDate;
    private String userName;
    private String title;
    private String info;
    private String icon;

    public Album() {
    }

    protected Album(Parcel in) {
        id = in.readInt();
        userId = in.readInt();
        releaseDate = in.readLong();
        lastUpdateDate = in.readLong();
        userName = in.readString();
        title = in.readString();
        info = in.readString();
        icon = in.readString();
    }

    public static final Creator<Album> CREATOR = new Creator<Album>() {
        @Override
        public Album createFromParcel(Parcel in) {
            return new Album(in);
        }

        @Override
        public Album[] newArray(int size) {
            return new Album[size];
        }
    };

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public long getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(long lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public long getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(long releaseDate) {
        this.releaseDate = releaseDate;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeInt(userId);
        dest.writeLong(releaseDate);
        dest.writeLong(lastUpdateDate);
        dest.writeString(userName);
        dest.writeString(title);
        dest.writeString(info);
        dest.writeString(icon);
    }
}
